﻿using System.Collections.Generic;

namespace StockMonitor.Business
{
    /// <summary>
    /// 指标简单计算器通用接口，负责监控并计算【一只股票】
    /// 计算MA 3/5/21指标接口
    /// </summary>
    public interface ICaptialCalculator
    {
        /// <summary>
        /// 标识
        /// </summary>
        string Key { get; }

        /// <summary>
        /// 初始化指标计算器
        /// </summary>
        /// <param name="stockCode">股票代码</param>
        void Init(string stockCode);

        /// <summary>
        /// 股票代码
        /// </summary>
        string StockCode { get; set; }

        /// <summary>
        /// 检测指标信号
        /// </summary>
        /// <returns>应发信号</returns>
        Enums.Signal DetectSignal();

        /// <summary>
        /// 检测指标信号
        /// </summary>
        /// <param name="currentPrice">当前价格</param>
        /// <returns>应发信号</returns>
        Enums.Signal DetectSignal(double currentPrice);
    }
}
